package com.project.mapper;


import com.project.domain.dto.projectApplyDto.*;
import com.project.domain.dto.projectCheckDto.SearchExcelReqDto;
import com.project.domain.entity.BizProjectAppBookBudgetFee;
import com.project.domain.entity.BizProjectApplyBook;
import com.project.domain.entity.BizProjectApplyBookMember;
import com.project.domain.entity.BizProjectApplyInfo;
import com.project.domain.vo.BizProjectApplyBookVo;
import com.project.domain.vo.BizProjectApplyInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by cw13031 on 2025/2/6.
 * Description:
 */
@Mapper
public interface ProjectApplyMapper {
    List<Object> test();

    List<HashMap<String,Object>> list(BizProjectApplyInfoVo bizProjectApplyInfoVo);

    List<HashMap<String, Integer>> listStatistics(BizProjectApplyInfoVo bizProjectApplyInfoVo);

    void add(BizProjectApplyInfo bizProjectApplyInfo);

    void edit(BizProjectApplyInfo bizProjectApplyInfo);

    void delete(List<String> ids);

    void changeState(BizProjectApplyInfo bizProjectApplyInfo);

    void materialsAdd_1_book(BizProjectApplyBookVo bizProjectApplyBookVo);

    void materialsAdd_2_member(BizProjectApplyBookVo bizProjectApplyBookVo);

    HashMap<String,Object> materialsGetInfo(BizProjectApplyBookVo bizProjectApplyBookVo);

    HashMap<String,Object> getBookByBookId(BizProjectApplyBookVo bizProjectApplyBookVo);

    void materialsSaveInfoInsert(BizProjectApplyBookVo bizProjectApplyBookVo);

    void materialsSaveInfoUpdate(BizProjectApplyBookVo bizProjectApplyBookVo);

    List<HashMap<String,Object>> materialsGetMember(BizProjectApplyBookVo bizProjectApplyBookVo);

    ArrayList<BizProjectApplyBookMember> gtMembersByBookId(@Param("bookId")String bookId);

    void materialsSaveMember(BizProjectApplyBookVo bizProjectApplyBookVo);

    void materialsDeleteMember(BizProjectApplyBookVo bizProjectApplyBookVo);


    BizProjectApplyBookVo getApplyBookByBookId(BizProjectApplyBookVo bizProjectApplyBookVo);

    List<HashMap<String,Object>> getBudgetByArgs(@Param("projectTypeCode")String projectTypeCode, @Param("projectStartDate")String projectStartDate, @Param("applyBookId")String applyBookId);

    List<HashMap<String,Object>> getBudgetByArgsV2(@Param("applyBookId")String applyBookId);

    List<BizProjectAppBookBudgetFee> getBudgetByBookId(@Param("bookId")String bookId);

    void saveBudget(@Param("withoutIdBudgetsList") ArrayList<BizProjectAppBookBudgetFee> withoutIdBudgetsList);

//    void updateBudget(@Param("withIdBudgetsList") ArrayList<BizProjectAppBookBudgetFee> withIdBudgetsList);

    int deleteBudgetsByBudgetId(@Param("list") ArrayList<String> list);

    int changeBookState(ChangeBookStateDto args);

    ApplyInfoViewResDto getApplyInfoById(@Param("id")String id);

    ArrayList<HashMap<String, String>> getFileInfoByFileIds(@Param("fileIdArray")String[] fileIdArray);

    int deleteApplyBookByBookId(@Param("list")List<String> ids);

    int deleteApplyBookMemberByBookId(@Param("list")List<String> ids);

    int deleteApplyBookBudgetByBookId(@Param("list")List<String> ids);
    void updateBookWhileLixiang(BizProjectApplyBook book);

    BizProjectApplyBook getBizBookByBookId(@Param("bookId")String bookId);

    String getBudgetStandardIdByInfoId(@Param("infoId")String infoId);

    ArrayList<ApplyHistoryResDto> applyHistory(ApplyHistoryReqDto dto);

    ArrayList<IJoinResDto> i_join(IJoinReqDto dto);

    ArrayList<ExportHistoryApplyBookMybatisDto> exportHistoryApplyExcel(ApplyHistoryExcelReqDto dto);

    ArrayList<ExportApplyBookMybatisDto> exportBookExcel(SearchExcelReqDto dto);

    void adaptSubmitType(BizProjectApplyBookVo book);

    int updateProjectCode(BizProjectApplyBookVo book);

    String allowLixiangRollBack(@Param("projectId") String projectId);

    ArrayList<String> getExpertReviewIdsByBookId(@Param("bookIds")List<String> bookIds);

    int deleteExpertReviewByBookId(@Param("bookIds")List<String> bookIds);

    int deleteReviewResultByExpertReviewId(@Param("expertReviewIds")List<String> expertReviewIds);
}
